package cn.xuewei.mapper;

import cn.xuewei.pojo.entity.SessionList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SessionListMapper {

    SessionList selectByPrimaryKey(Integer id);

    int insert(SessionList sessionList);

    Integer selectByUser(@Param("fromId") Integer fromId, @Param("toId") Integer toId);

    List<SessionList> selectByUserId(Integer id);

    List<Integer> selectToUserIdByUserId(Integer id);

    void deleteByPrimaryKey(Integer Id);

    void deleteUnReadCount(@Param("fromUserId") Integer fromUserId,@Param("toUserId") Integer toUserId);

    void addUnReadCount(@Param("userId") Integer userId,@Param("toUserId") Integer toUserId);
}
